<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>小程序打包</title>
    <style>
        body {
            padding: 50px;
            font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
        }
    </style>
    <script>
        function httpGet(url) {
            var xmlHttp = new XMLHttpRequest();
            xmlHttp.open("GET", url, false); // false: wait respond
            xmlHttp.send(null);
            return xmlHttp.responseText;
        }

        function f() {
            var url = "http://10.1.1.16:3000/package?v="
                + document.getElementById('version').value
                + '&b=' + document.getElementById('branch').value;
            document.getElementById('out').innerHTML = httpGet(url);
        }

        function help() {
            var url = "http://10.1.1.16:3000/help";
            document.getElementById('out').innerHTML = httpGet(url);
        }
    </script>

</head>
<body>
<span>version </span><input id='version' value="0.7.3"/>
<span>branch </span><input id='branch' value="dev"/>
<button onclick='f()'>打包</button>
<button onclick='help()'>帮助</button>
<br/>
<pre id='out'></pre>
</body>
</html>